package com.bl.car.repositiy;

import com.bl.car.entity.Driver;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 驾驶员数据接口
 *
 * @author zhx
 * @create 2017-11-16 11:32
 **/
@Repository
public interface DriverRepository extends JpaRepository<Driver,Long>{
    List<Driver> findByOwnerIdNotNullOrderById();
    List<Driver> findByUserIdNotNullOrderById();
    Driver findByUserId(String userId);
    List<Driver> findByOwnerIdOrderById(String ownerId);

    List<Driver> findByOwnerIdAndNameLikeOrderById(String ownerId,String name);


    List<Driver>  findByIsEffect(String isEffect);;

}
